package bulk_param.controller;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import bulk_param.modele.ReadCVS;
import bulk_param.view.Inactive_Contact_Num_View;

public class SetSelectedBoxInactivationController implements ActionListener{

	private Inactive_Contact_Num_View inactive_Contact_Num_View;
	private ReadCVS readCVS;
	
	public SetSelectedBoxInactivationController(Inactive_Contact_Num_View inactive_Contact_Num_View){
		this.inactive_Contact_Num_View=inactive_Contact_Num_View;
	}
	
	@Override
	public void actionPerformed(ActionEvent arg0) {
		// TODO Auto-generated method stub
		
		if(arg0.getSource().equals(inactive_Contact_Num_View.cbPays)){
			if(inactive_Contact_Num_View.cbPays.getSelectedItem()==null){
			}else{
			readCVS=new ReadCVS();
			String indicatif=readCVS.indicatifDictionary(inactive_Contact_Num_View.cbPays.getSelectedItem().toString());
			System.out.println("aide indicatif :"+indicatif);
			inactive_Contact_Num_View.txtZABPQ.setText("+"+indicatif);
			}
		}
		
	}	
}
